//
//  BDImagePickerManager.h
//  ProjectForBD
//
//  Created by Jaesun on 16/12/16.
//  Copyright © 2016年 B.D. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>


/*
 
 用法： type:UIImagePickerControllerSourceType
 
 1. UIImagePickerControllerSourceTypeCamera 相机
 2. UIImagePickerControllerSourceTypePhotoLibrary 普通相册
 3. UIImagePickerControllerSourceTypeSavedPhotosAlbum 时刻相册
 
 [[BDImagePickerManager shareImagePickerManager] imagePickerWithSourceType:UIImagePickerControllerSourceTypeCamera inViewController:self
 completion:^(UIImage *image, NSString *dateTime) { // image 选中或拍摄的图片
    imageView.image = image;
 }];
 
 */

typedef void(^Completion)(UIImage *image, NSString *dateTime);

@interface BDImagePickerManager : NSObject<UIImagePickerControllerDelegate,UINavigationControllerDelegate>

@property (nonatomic, strong) UIViewController *preController;

@property (nonatomic, strong) Completion completion;

//@property (nonatomic, strong) UIImagePickerController *imagePicker;

+ (instancetype)shareImagePickerManager;

- (void)imagePickerWithSourceType:(UIImagePickerControllerSourceType)type inViewController:(UIViewController *)preController completion:(Completion)completion;


@end
